package top.infopub.mgr.mkt.service;

import java.util.List;

import top.infopub.generic.GenericService;
import top.infopub.mgr.mkt.domain.DeciProDomain;
import top.infopub.mgr.mkt.vo.DeciProVo;
import top.infopub.model.mkt.DeciPro;
import top.infopub.model.mkt.DeciProAtt;
import top.infopub.model.mkt.DeciProCoop;
import top.infopub.model.mkt.DeciProQuote;
import top.infopub.model.mkt.DeciProSub;

import com.github.pagehelper.Page;

public interface DeciProService extends GenericService<DeciPro, String> {

    /**
     * 根据条件查询决策记录
     * @param page
     * @param deciProVo
     * @return 
     * @see
     */
    Page<DeciProDomain> selectPageByDomainWhere(Page<DeciProDomain> page, DeciProVo deciProVo);

    /**
     * 根据条件查询-我审批的决策记录
     * @param page
     * @param deciProVo
     * @return 
     * @see
     */
    Page<DeciProDomain> selectMyCheckByDomainWhere(Page<DeciProDomain> page, DeciProVo deciProVo);

    /**
     * 根据id查询决策详情
     * @param id 决策id
     * @return 
     * @see
     */
    DeciProVo selectById(String id);

    /**
     * 新增决策记录
     * @param deciPro
     * @param deciProCoops
     * @param deciProSubs
     * @param deciProQuotes
     * @param fileAtts 
     * @see
     */
    void addDeciPro(DeciProVo deciPro, List<DeciProCoop> deciProCoops,
                    List<DeciProSub> deciProSubs, List<DeciProQuote> deciProQuotes,
                    List<DeciProAtt> fileAtts);

    /**
     * 查询可交底的决策记录
     * @return 
     * @see
     */
    List<DeciPro> selectUsableDeciPro();
    
    /**
     * 根据项目编号查询投标综合利润（万元）/综合利润率（%）
     */
    DeciPro selectByProCode(String proCode);

    /**
     * 根据项目编号查询是否已存在（processStatus in ('1','9')）
     * @param proCode 项目编号
     * @return 
     * @see
     */
    List<DeciPro> selectListByProCode(String proCode);
    
}